﻿using System.Web.UI.WebControls;
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NTQOnlineExam.Services.EntityFW.Entity;
using NTQOnlineExam.Services.Models;
using NTQOnlineExam.Services.ReportService.Section;
using NTQOnlineExamFrontend.Models;

namespace NTQOnlineExamFrontend.App_Start
{
    public class ModelMapper
    {
        public static void RegisterMapper()
        {
            Mapper.CreateMap<QuestionDTO, ExaminationDetailsViewModel>();
       
            Mapper.CreateMap<BasketDTO, BasketViewModel>()
                   .ForMember("TotalProductPrice", map => map.MapFrom(d => d.GetTotalProductPrice()))
                   .ForMember("TotalPrice", map => map.MapFrom(d => d.GetTotalPrice()));
            Mapper.CreateMap<UserProfileDTO, CheckoutViewModel>();
            Mapper.CreateMap<UserProfileDTO, ProfileViewModel>();
           
        }
    }
}